<?php
namespace app\admin\controller;


class Index extends Common {

    public function bnr(){
        $banner = db('banner')->order('id asc')->select();
        $this->assign('banner',$banner);
        return $this->fetch();
    }

    public function menuset(){
        $menu = db('menu')->where(['menu_parentid'=>0])->order('id asc')->select();
        foreach ($menu as $k=>$v){
            $children = db('menu')->where(['menu_parentid'=>$v['id']])->order('id asc')->select();
            $menu[$k]['children'] = $children;
        }
//        halt($menu);
        $this->assign('menu',$menu);
        return $this->fetch();
    }

    public function ticket(){

        return $this->fetch();
    }

    public function rankList(){
        return $this->fetch();
    }

    public function invoice(){
        return $this->fetch();
    }

    public function complaint(){
        return $this->fetch();
    }

    public function line(){
        return $this->fetch();
    }

    public function member(){
        $userInfo = db('user')->select();

        $this->assign('userInfo',$userInfo);
        return $this->fetch();
    }

    public function htmlContent(){
        $data = input('');

        $this->assign('data',$data);
        return $this->fetch();
    }
}
